﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microhard.Core.DBUtility;
using Microhard.Permission.Interface;
using Microhard.Permission;
using Microhard.Permission.MVCFilter;

namespace Microhard.WebUI.Areas.Admin.Controllers
{
    public class CacheWarpperController : Controller
    {
        [MVCFilterAtrForLogon]//登录验证
        public ActionResult Index()
        {
            return View();
        }

        [MVCFilterAtrForLogon]//登录验证
        public ActionResult DoWarpper(string code, ScopeResult scope)
        {
            if ("123@abc" == code)
            {
                LongonUserPermissionCache lupc = new LongonUserPermissionCache();
                lupc.RefreshCache();

                LogonUserInfoCache luic = new LogonUserInfoCache();
                luic.RefreshCache();

                ViewData["succeed"] = "刷新成功";
            }
            return View("Index");
        }

    }
}
